package model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

@Entity
@Table(name = "HORAIRE_CTM")
public class HoraireCTM {
	private int id;
	private String heuredepart;
	private String heurearrivee;
	private String prix;
	private String observartion;
	private VoyageCTM voyagectm;

	public HoraireCTM(String heuredepart, String heurearrivee, String prix,
			String observartion, VoyageCTM voyagectm) {
		super();
		this.heuredepart = heuredepart;
		this.heurearrivee = heurearrivee;
		this.prix = prix;
		this.observartion = observartion;
		this.voyagectm = voyagectm;
	}

	public HoraireCTM() {
		super();
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID_HORAIRE_CTM")
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "HEUREDEPART")
	public String getHeuredepart() {
		return heuredepart;
	}

	public void setHeuredepart(String heuredepart) {
		this.heuredepart = heuredepart;
	}

	@Column(name = "HEUREARRIVEE")
	public String getHeurearrivee() {
		return heurearrivee;
	}

	public void setHeurearrivee(String heurearrivee) {
		this.heurearrivee = heurearrivee;
	}

	@Column(name = "PRIX")
	public String getPrix() {
		return prix;
	}

	public void setPrix(String prix) {
		this.prix = prix;
	}

	@Column(name = "OBSERVATION")
	public String getObservartion() {
		return observartion;
	}

	public void setObservartion(String observartion) {
		this.observartion = observartion;
	}

	@ManyToOne
	@JoinColumn(name = "ID_VOYAGE_CTM")
	@JsonIgnore
	public VoyageCTM getVoyagectm() {
		return voyagectm;
	}

	public void setVoyagectm(VoyageCTM voyagectm) {
		this.voyagectm = voyagectm;
	}

}
